home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20010306-20010921 / 000030_news@columbia.edu _Fri Mar 16 15:21:31 2001.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
  3.     by monire.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id PAA15753
  4.     for <kermit.misc@cpunix.cc.columbia.edu>; Fri, 16 Mar 2001 15:21:30 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id PAA24252
  7.     for kermit.misc@watsun.cc.columbia.edu; Fri, 16 Mar 2001 15:19:41 -0500 (EST)
  8. X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
  9. From: fdc@columbia.edu (Frank da Cruz)
  10. Subject: Re: Confirm FTP Upload
  11. Date: 16 Mar 2001 20:19:39 GMT
  12. Organization: Columbia University
  13. Message-ID: <98tsgr$nlp$1@newsmaster.cc.columbia.edu>
  14. To: kermit.misc@columbia.edu
  15.  
  16. : Rick wrote:
  17. : > 
  18. : > My company is currently processing two large text files on an E10K box and
  19. : > then uploading them to an anonymous FTP server. One file is processed
  20. : > daily and the other weekly, the processing and upload is via crontab. The
  21. : > customer that receives this text file has now requested that a separate
  22. : > "control" file be put on the FTP site which they can look for and if the
  23. : > control file is available they will continue to retrieve the text
  24. : > file. The intent is that this control file will only be there if the file
  25. : > that I sent was received by the FTP site without error. I'm a little
  26. : > confused on how to verify that what I sent was received...
  27. :
  28. This is an insolable problem.  However, if you transferred the file in the
  29. right mode (text versus binary) and there were no errors, the chances are
  30. vanishingly small that file was not transferred correctly, since TCP and IP
  31. both provide error detection and correction.  If you transfer in binary mode,
  32. and the size the is the same, that's another good indicator of succees.
  33.  
  34. Anyway, I think what the customer really wants is to know that an upload
  35. has finished before grabbing the file from the upload area, which is an
  36. easier problem to solve.
  37.  
  38. : > ... the best thing I
  39. : > can think of is that I run another process that goes out to the FTP site
  40. : > downloads the file, compares it character by character and if it matches
  41. : > then send the control file.
  42. :
  43. This would not catch some hypothetical errors that are both systematic and
  44. reversible.
  45.  
  46. : > This doesn't seem like a very good method
  47. : > because I'm checking to see if one operation has failed with an operation
  48. : > that could fail.
  49. :
  50. Right.  First I'd suggest you read the following FTP scripting tutorial,
  51. which discusses the same problem you're trying to address:
  52.  
  53.   http://www.columbia.edu/kermit/ftpscript.html
  54.  
  55.  
  56. The tutorial pertains to the new Kermit Project FTP client, is designed to
  57. handle such situations.  Example 5 applies to your query.
  58.  
  59. If you want an even greater level of confidence, you might consider using
  60. Kermit protocol rather than FTP because:
  61.  
  62.  . FTP protocol includes no error detection or correction whatsoever;
  63.    it relies completely on the underlying transport for that.  Kermit,
  64.    on the other hand, applies rigorous checking on top of TCP and IP.
  65.  
  66.  . FTP protocol includes no mechanism for confirming that a file was
  67.    was fully received.  The sender simply closes the connection at the
  68.    end of the file.  Kermit protocol, on the other hand, sends an "end
  69.    of file" packet at the end of each file and requires positive
  70.    confirmation from the receiver before declaring the transfer
  71.    successfully terminated.
  72.  
  73. Internet Kermit servers are available that can be used just like Internet
  74. FTP servers, and that also include security and privacy methods lacking
  75. from most FTP servers.  For more information see:
  76.  
  77.   http://www.columbia.edu/kermit/cuiksd.html
  78.  
  79. Also see the following case study:
  80.  
  81.   http://www.columbia.edu/kermit/case10.html
  82.  
  83. which discusses "atomic file movement" in detail, which is the topic of
  84. your query.
  85.  
  86. - Frank